
#ifndef __MESSAGES_H
#define __MESSAGES_H

#include "stdafx.h"
#include "SGD Wrappers\SGD_Math.h"
enum eMsgTypes{ MSG_NULL = 0, MSG_MUM, MSG_BAT, MSG_SPIDER, MSG_PICKUP, MSG_REPICK, MSG_WEB, MSG_DESTROYWEB, MSG_RAT,
				MSG_ARROW, MSG_DESTROYARROW, MSG_TURRET, MSG_SEEKTURRET, MSG_SEEKARROW, MSG_SPIKETRAP, MSG_SPEARTRAP,
				MSG_FLAMETRAP, MSG_FALLINGPLAT, MSG_SNAKE, MSG_DESTROYPOINT, MSG_MAX };

typedef int MSGID;

class CBaseMessage
{
private:
	MSGID	m_msgID;

public:
	CBaseMessage(MSGID msgID) { m_msgID = msgID;}

	virtual ~CBaseMessage(void) {}

	MSGID GetMsgID(void)	{ return m_msgID; }
};

struct MummyData
{
	POINT spawnpoint;
	int vel;
	int dist;
};

class CSpawnMummyMessage : public CBaseMessage
{
private:
	MummyData dat;
public:
	CSpawnMummyMessage(POINT spawn,int vel, int dist);
	MummyData GetMummyData(){return dat;}
};

class CSpawnBatMessage : public CBaseMessage
{
private:
	POINT spawn;
public:
	CSpawnBatMessage(POINT spawn);
	POINT GetSpawn()	{return spawn;}
};

class CSpawnFallingPlatformMessage : public CBaseMessage
{
private:
	POINT spawn;
public:
	CSpawnFallingPlatformMessage(POINT spawn);
	POINT GetSpawn()	{return spawn;}
};

class CSpawnSpiderMessage : public CBaseMessage
{
private:
	POINT spawn;
	int paceDist;
	int startDir;
public:
	CSpawnSpiderMessage(POINT spawn, int paceDist, int startDir);
	POINT GetSpawn() {return spawn;}
	int GetPaceDistance() {return paceDist;}
	int GetStartDirection() {return startDir;}
};

class CSpawnWebMessage : public CBaseMessage
{
private:
	POINT spawn;
public:
	CSpawnWebMessage(POINT spawn);
	POINT GetSpawn() {return spawn;}
};

class CWeb;
class CDestroyWebMessage : public CBaseMessage
{
private:
	CWeb* web;

public:
	CDestroyWebMessage(CWeb* pWeb);
	~CDestroyWebMessage();

	CWeb* GetWeb() {return web;}
};

class CSpawnPickupMessage : public CBaseMessage
{
private:
	POINT spawn;
	int type;
public:
	CSpawnPickupMessage(POINT spawn,int type);
	POINT GetSpawn() {return spawn;}
	int GetType() {return type;}
};

class CPickup;
class CRemovePickupMessage : public CBaseMessage
{
private:
	CPickup* pickup;
public:
	CRemovePickupMessage(CPickup* pickup);
	CPickup* GetPickup() {return pickup;}
};

class CSpawnRatMessage : public CBaseMessage
{
private:
	POINT spawn;
	int paceDist;
	int startDir;
public:
	CSpawnRatMessage(POINT spawn, int paceDist, int startDir);
	POINT GetSpawn() {return spawn;}
	int GetPaceDistance() {return paceDist;}
	int GetStartDirection() {return startDir;}
};

class CSpawnSnakeMessage : public CBaseMessage
{
private:
	int m_nPosX;
	int m_nPosY;
public:
	CSpawnSnakeMessage(int nPosX, int nPosY);
	int GetPosX() {return m_nPosX;}
	int GetPosY() {return m_nPosY;}
};

class CSpawnArrowMessage : public CBaseMessage
{
private:
	POINT spawn;
	int m_nFireDirection;
public:
	CSpawnArrowMessage(POINT pspawn, int move);
	POINT GetSpawn() {return spawn;}
	int GetFireDirection() {return m_nFireDirection;}
};

class CSpawnSeekArrowMessage : public CBaseMessage
{
private:
	tVector2D arrowVec;
	POINT spawn;
	float m_fRotation;
public:
	CSpawnSeekArrowMessage(POINT pspawn, tVector2D arrow, float fRotation);
	tVector2D GetVector() {return arrowVec;}
	POINT GetSpawn() {return spawn;}
	float GetRotation() {return m_fRotation;}
};

class CArrow;
class CDestroyArrowMessage : public CBaseMessage
{
private:
	CArrow* m_pArrow;

public:
	CDestroyArrowMessage(CArrow* pArrow);
	~CDestroyArrowMessage();

	CArrow* GetArrow() {return m_pArrow;}
};

class CDestroyPointMessage : public CBaseMessage
{
private:
	POINT* pt;

public:
	CDestroyPointMessage(POINT* pt);
	~CDestroyPointMessage();

	POINT* GetPoint() {return pt;}
};

class CSpawnTurretMessage : public CBaseMessage
{
private:
	POINT spawn;
	int FireDirection;
	int	NumProj;

public:
	CSpawnTurretMessage(POINT pspawn, int fire, int numProj);
	POINT GetSpawn() {return spawn;}
	int GetFireDirection() {return FireDirection;}
	int GetNumProj() {return NumProj;}
};

class CSpawnSeekTurretMessage : public CBaseMessage
{
private:
	POINT spawn;

public:
	CSpawnSeekTurretMessage(POINT pspawn);
	POINT GetSpawn() {return spawn;}
};

class CSpawnSpikeTrapMessage : public CBaseMessage
{
private:
	POINT spawn;
	int nRotation;
public:
	CSpawnSpikeTrapMessage(POINT pspawn, int nRotation);
	POINT GetSpawn() {return spawn;}
	int GetRotation() {return nRotation;}
};

class CSpawnSpearTrapMessage : public CBaseMessage
{
private:
	POINT spawn;
	string szEventKey;
	int nRotation;
public:
	CSpawnSpearTrapMessage(POINT pspawn, string key, int nRotation);
	POINT GetSpawn() {return spawn;}
	string GetEventKey() {return szEventKey;}
	int GetRotation() {return nRotation;}
};

class CSpawnFlameTrapMessage : public CBaseMessage
{
private:
	POINT spawn;
	string szEventKey;
	int nRotation;
public:
	CSpawnFlameTrapMessage(POINT pspawn, string key, int nRotation);
	POINT GetSpawn() {return spawn;}
	string GetEventKey() {return szEventKey;}
	int GetRotation() {return nRotation;}
};


#endif